package com.dingding.order.core.distance.dao.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

import com.dingding.common.core.base.dao.impl.BaseDaoImpl;
import com.dingding.common.core.beans.StagePriceCity;
import com.dingding.order.core.distance.dao.IStagePriceCityDao;

/**
 * 
 * @ClassName: IStagePriceCityDao 
 * @Description: 城市阶段计价表操作DAO
 * @author CHEHAUNBO 
 * @date 2016年7月14日 下午4:53:52
 * 
 */
@Component("stagePriceCityDao")
public class StagePriceCityDaoImpl extends BaseDaoImpl<StagePriceCity> implements IStagePriceCityDao {

	private Logger log = Logger.getLogger(StagePriceCityDaoImpl.class);

	/**
	 * 
	 * 获取所有阶段计价城市
	 * 
	 * @Title: getStagePriceCity 
	 * @author CHEHAUNBO
	 * @since V2.3.1
	 * 
	 */
	@Override
	@Transactional(readOnly = true, isolation = Isolation.READ_COMMITTED)
	public List<StagePriceCity> getStagePriceCity() {

		List<StagePriceCity> stagePriceCities = null;
		try {
			stagePriceCities = super.queryAll();
		} catch (Exception e) {
			log.error("获取所有计价规则城市出现异常！", e);
		}

		return stagePriceCities;
	}

}
